// 定义分类API接口函数
import request from '@/utils/request'

// 获取所以分类(顶级，二级)
export const findAllCateGory = () => {
  return request('home/category/head', 'get')
}

// 获取单个顶级分类信息
export const findTopCategory = (id) => {
  return request('/category', 'get', { id })
}

// 二级分类的筛选分类
export const findSubCategoryFilter = (id) => {
  return request('/category/sub/filter', 'get', { id })
}

// 二级分类下的商品
export const findSubCategoryGoods = (params) => {
  return request('/category/goods/temporary', 'post', params)
}

// 获取品牌数据
export const findBrand = (limit) => {
  return request('/home/brand', 'get', { limit })
}
